<?php
    header("Content-Type:text/html;charset=utf-8");
    header("Refresh:10;url=http://www.baidu.com");
    echo "<span>10</span>秒针跳百度"
?>
<script>
window.onload = function(){
    var timer = 10;
    var ids = window.setInterval(function(){
        timer -- ;
        if(timer==0){
            window.clearInterval(ids);
            return;
        }
        document.querySelector("span").innerHTML = timer;
    },1000)
}
</script>